---
# tasks file for push-docker
#
- name: install docker
  action: "{{ ansible_pkg_mgr }} name=docker state=present"

- name: ensure docker daemon cert dir exists
  file:
    path: "{{docker_cert_dir}}"
    state: directory

- name: install docker client cert for registry
  copy:
    src: "{{private}}/files/koji/{{docker_cert_name}}.cert.pem"
    dest: "{{docker_cert_dir}}/client.cert"
    owner: root
    group: "releng-team"
    mode: 0640

- name: install docker client key for registry
  copy:
    src: "{{private}}/files/koji/{{docker_cert_name}}.key.pem"
    dest: "{{docker_cert_dir}}/client.key"
    owner: root
    group: "releng-team"
    mode: 0640

- name: start and enable docker
  service: name=docker state=started enabled=yes
